package com.liyiruo.testMain.processor;

import org.springframework.context.support.ClassPathXmlApplicationContext;

/**
 * 几个后置处理器的测试
 *
 * @author liyiruo
 * @Description
 * @Date 2023/4/20 下午10:34
 */
public class MyBeanDefinitionRegistryPostProcessorTest {
    public static void main(String[] args) {
        ClassPathXmlApplicationContext context = new ClassPathXmlApplicationContext("processor/beanDefinitionRegistryPostProcessor.xml");
        //被注解标记的
        Object otherBean = context.getBean("otherBean");
        Object userDaoImpl2 = context.getBean("userDaoImpl2");
        Object show = context.getBean("show");
        System.out.println("通过注解获取到的bean,otherBean=>"+otherBean);
        System.out.println("通过注解获取到的bean,userDaoImpl2=>"+userDaoImpl2);
        System.out.println("从xml里获取到的bean,show=>"+show);
    }
}
